/* 	SymEntry.java
	From: Department of CSE
	Authors: Le Minh Vu, Nguyen Hua Phung
	Date: 15/11/2007
*/
package MP.staticchecker;

import MP.lexicalanalysis.*;

public class SymEntry {	
	private Token id;
	private Type type;
	private String value;//newly added property using to store the literal
	public SymEntry(Token id,Type type) { 
		this.id = id;
		this.type = type;
		value = null;
	}
	public SymEntry(Token id,Type type,String v) { 
		this.id = id;
		this.type = type;
		value = v;
	}

	public String getLexeme() {
		return id.Lexeme;
	}

	public Type getType() {
		return type;
	}
	
	public void setType(Type t) {
		type = t;
	}
	
	public Token getId() {
		return id;
	}
	public String getValue(){
		return value;
	}
	public String toString() {
		return id.Lexeme+" "+type.toString();
	}
	
}
